TYRO.IClientEmbedded Class
Overview
The embedded API provides integration with Tyro terminals for mobile environments, for example the Tyro iClient Adapter for iOS.For iOS
To integrate with Tyro devices you will need to include the provided Tyro iOS iClient Adapter in your application.Constructor
TYRO.IClientEmbedded
-
apiKey -
posProductData -
[integratedReceipt] -
[integratedReceiptWidth] -
[mid] -
[tid]
Parameters:
-
apiKeyStringThe API key provided by Tyro.
-
posProductDataObjectAn object containing the following properties (check with Tyro in case of any questions):
-
posProductVendorStringName of your company.
-
posProductNameStringName of your product.
-
posProductVersionStringVersion of your product.
-
-
[integratedReceipt]String optionalWhether receipts will be printed on the POS (true) or on the terminal (false).
-
[integratedReceiptWidth]String optionalThe number of characters that fit the width of your receipt paper, so we can align the text nicely.
-
[mid]Int optionalOverride the configured mid for multi-merchant terminals.
-
[tid]Int optionalOverride the configured tid for multi-merchant terminals.
Example:
// iOS
TyroClient client = [[TyroClient alloc] initWithWebView: webView
webViewDelegate: webViewDelegate
apiKey: @"secretKey"
posProductVendor: @"Name of your company"
posProductName: @"Name of your product"
posProductVersion: @"Version of your product"];
// Optional: Connect to a test simulator that does not require a physical terminal
client.baseUrl = @"https://iclientsimulator.test.tyro.com";
// Optional: Connect to a test system that can only be used with a physical terminal
client.baseUrl = @"https://iclient.test.tyro.com";
Item Index
Methods
addTip
-
completionReference -
tipAmount
Add a tip to a previous purchase (initiatePurchase).
Parameters:
-
completionReferenceStringTransaction identifier from the original transaction.
-
tipAmountStringThe tip amount to add in cents.
Example:
// iOS
Not supported
closeTab
-
completionReference -
amount
Close a previously opened bar tab with a final amount. The customer will be charged.
Parameters:
-
completionReferenceStringTransaction identifier from the original transaction.
-
amountStringThe final amount to charge the customer.
Example:
// iOS
[self.client performOperation: @"closeTab"
parameters: @{@"amount" : @"12000",
@"completionReference" : @"439440"}
receiptReceivedCallback: nil
transactionCompleteCallback: ^(NSDictionary *result) {NSLog(@"Transaction complete: %@", result);}];
completePreAuth
-
requestParams
Close a previously opened preAuth with a final amount. The customer will be charged.
Parameters:
-
requestParamsObjectAn object containing the following properties:
-
completionReferenceStringTransaction identifier from the original transaction.
-
amountStringThe final amount to charge the customer.
-
[integrationKey]String optionalSupply the integration key if your browser does not support local storage.
-
[mid]Int optionalOverride the configured mid for multi-merchant terminals.
-
[tid]Int optionalOverride the configured tid for multi-merchant terminals.
-
Example:
// iOS
[self.client performOperation: @"completePreAuth"
parameters: @{@"completionReference" : @"439440",
@"amount" : @"12000",
@"integrationKey" : @"ABC123",
@"mid" : @"1",
@"tid" : @"2"}
receiptReceivedCallback: nil
transactionCompleteCallback: ^(NSDictionary *result) {NSLog(@"Transaction complete: %@", result);}];
continueLastTransaction
()
Tell the terminal to continue last transaction
Example:
// iOS
[self.client performOperation: @"continueLastTransaction"
receiptReceivedCallback: ^(NSDictionary *result) {NSLog(@"Receipt received: %@", result);}
transactionCompleteCallback: ^(NSDictionary *result) {NSLog(@"Transaction complete: %@", result);}];
easyclaim
-
type -
payload -
rightsAssigned
Tell the terminal to start a bulk billed Easyclaim request.
Parameters:
-
typeStringOne of "bulkbill", "partpaid" or "fullypaid".
-
payloadStringThe Easyclaim payload that is forwarded to Medicare.
-
rightsAssignedBooleanWhether rights have already been assigned for bulk bill claims
Example:
// iOS
[self.client performOperation: @"easyclaim"
parameters: @{@"type" : @"fullypaid",
@"rightsAssigned" : @"true",
@"payload" : @"<ns1:patienteClaimingRequest>...</ns1:patienteClaimingRequest>"}
receiptReceivedCallback: nil
transactionCompleteCallback: ^(NSDictionary *result) {NSLog(@"Transaction complete: %@", result);}];
healthpointCancel
-
providerId -
serviceType -
claimItemsCount -
totalClaimAmount -
claimItems -
refTag
Tell the terminal to cancel a completed HealthPoint claim.
Parameters:
-
providerIdStringThe 8 character id of the provider attending the patient.
-
serviceTypeStringThe 1 alphabetic character representing the category of service.
-
claimItemsCountStringThe total number of claim items.
-
totalClaimAmountIntThe total amount of all claim items in cents.
-
claimItemsStringA List
-
refTagStringThe reference tag returned in the original claim's final transaction status response.
Example:
// iOS
[self.client performOperation: @"healthpointCancel"
parameters: @{
@"providerId" : @"2147661H",
@"serviceType" : @"D",
@"refTag" : @"123456",
@"claimItemsCount" : @"2",
@"totalClaimAmount" : @"300",
@"claimItems": @[
@{
@"claimAmount" : @"100",
@"serviceCode" : @"00001",
@"description" : @"SKULL XRAY",
@"serviceReference" : @"01",
@"patientId" : @"01",
@"serviceDate" : @"20131010"
},
@{
@"claimAmount" : @"200",
@"serviceCode" : @"00002",
@"description" : @"TEETH WHITENING",
@"serviceReference" : @"01",
@"patientId" : @"01",
@"serviceDate" : @"20131010"
}
]
}
receiptReceivedCallback: nil
transactionCompleteCallback: ^(NSDictionary *result) { NSLog(@"Transaction complete: %@", result); }];
healthpointClaim
-
providerId -
serviceType -
claimItemsCount -
totalClaimAmount -
claimItems
Tell the terminal to start a HealthPoint claim.
Parameters:
-
providerIdStringThe 8 character id of the provider attending the patient.
-
serviceTypeStringThe 1 alphabetic character representing the category of service.
-
claimItemsCountStringThe total number of claim items.
-
totalClaimAmountIntThe total amount of all claim items in cents.
-
claimItemsStringA List
Example:
// iOS
[self.client performOperation: @"healthpointClaim"
parameters: @{
@"providerId" : @"2147661H",
@"serviceType" : @"D",
@"claimItemsCount" : @"2",
@"totalClaimAmount" : @"300",
@"claimItems": @[
@{
@"claimAmount" : @"100",
@"serviceCode" : @"00001",
@"description" : @"SKULL XRAY",
@"serviceReference" : @"01",
@"patientId" : @"01",
@"serviceDate" : @"20131010"
},
@{
@"claimAmount" : @"200",
@"serviceCode" : @"00002",
@"description" : @"TEETH WHITENING",
@"serviceReference" : @"01",
@"patientId" : @"01",
@"serviceDate" : @"20131010"
}
]
}
receiptReceivedCallback: nil
transactionCompleteCallback: ^(NSDictionary *result) { NSLog(@"Transaction complete: %@", result); }];
healthpointReconciliationReport
-
reconDate -
reportType
Retrieve a payments or claims HealthPoint reconciliation report.
Parameters:
-
reconDateStringThe reporting date in format yyyyMMdd.
-
reportTypeStringThe report type. Valid values are payments and claims.
Example:
// iOS
[self.client performOperation: @"healthpointReconciliationReport"
parameters: @{
@"reconDate" : @"20120129",
@"reportType" : @"payments"
}
receiptReceivedCallback: nil
transactionCompleteCallback: ^(NSDictionary *result) {NSLog(@"Transaction complete: %@", result);}];
incrementPreAuth
-
completionReference -
amount -
[integrationKey] -
[mid] -
[tid] -
[transactionId]
Tell Tyro to increment a previously opened preAuth transaction.
Parameters:
-
completionReferenceStringTransaction identifier from the original transaction.
-
amountStringThe incremental amount to increment the pre-auth amount.
-
[integrationKey]String optionalSupply the integration key if your browser does not support local storage.
-
[mid]Int optionalOverride the configured mid for multi-merchant terminals.
-
[tid]Int optionalOverride the configured tid for multi-merchant terminals.
-
[transactionId]String optionalThe integrated transactionId.
Example:
// iOS
[self.client performOperation: @"incrementPreAuth"
parameters: @{@"completionReference" : @"439440",
@"amount" : @"12000",
@"integrationKey" : @"ABC123",
@"mid" : @"1",
@"tid" : @"2"}];
manualSettlement
()
Manually settle the terminal: close off reporting for the day.
Example:
// iOS
[self.client performOperation: @"manualSettlement"
parameters: nil
receiptReceivedCallback: nil
transactionCompleteCallback: ^(NSDictionary *result) {NSLog(@"Transaction complete: %@", result);}];
openPreAuth
-
amount
Tell the terminal to start an open preAuth transaction.
Parameters:
-
amountStringThe preAuth limit (maximum amount to charge the customer) in cents.
Example:
// iOS
[self.client performOperation: @"openPreAuth"
parameters: @{@"amount" : @"12000"}
receiptReceivedCallback: ^(NSDictionary *result) {NSLog(@"Receipt received: %@", result);}
transactionCompleteCallback: ^(NSDictionary *result) {NSLog(@"Transaction complete: %@", result);}];
openTab
-
amount
Tell the terminal to start an open tab transaction.
Parameters:
-
amountStringThe tab limit (maximum amount to charge the customer) in cents.
Example:
// iOS
[self.client performOperation: @"openTab"
parameters: @{@"amount" : @"12000"}
receiptReceivedCallback: ^(NSDictionary *result) {NSLog(@"Receipt received: %@", result);}
transactionCompleteCallback: ^(NSDictionary *result) {NSLog(@"Transaction complete: %@", result);}];
purchase
-
amount -
[cashout] -
[healthpointTransactionId]
Tell the terminal to start a purchase transaction.
Parameters:
-
amountStringThe purchase amount (amount to charge the customer) in cents.
-
[cashout]String optionalCash out amount in cents.
-
[healthpointTransactionId]String optionalThe integrated transaction ID of the original HealthPoint Claim (used for gap payments).
Example:
// iOS
[self.client performOperation: @"purchase"
parameters: @{@"amount" : @"12000"}
receiptReceivedCallback: ^(NSDictionary *result) {NSLog(@"Receipt received: %@", result);}
transactionCompleteCallback: ^(NSDictionary *result) {NSLog(@"Transaction complete: %@", result);}];
reconciliationReport
-
terminalBusinessDay -
reportType -
reportFormat -
integrationKey -
[mid] -
[tid]
Retrieve a summary or detail reconciliation report.
Parameters:
-
terminalBusinessDayStringThe reporting date in format yyyyMMdd.
-
reportTypeStringThe report type. Valid values are summary and detail.
-
reportFormatStringThe report format. Valid values are txt and xml. The txt version is pre-formatted in a monospaced font.
-
integrationKeyStringSupply the integration key if your browser does not support local storage.
-
[mid]Int optionalOverride the configured mid for multi-merchant terminals.
-
[tid]Int optionalOverride the configured tid for multi-merchant terminals.
Example:
// iOS
[self.client performOperation: @"reconciliationReport"
parameters: @{@"terminalBusinessDay" : @"20120129",
@"reportFormat": @"txt",
@"reportType": @"summary"}
receiptReceivedCallback: nil
transactionCompleteCallback: ^(NSDictionary *result) {NSLog(@"Transaction complete: %@", result);}];
refund
-
amount
Tell the terminal to start a refund transaction.
Parameters:
-
amountStringThe refund amount (amount to be given to the customer) in cents.
Example:
// iOS
[self.client performOperation: @"refund"
parameters: @{@"amount" : @"12000"}
receiptReceivedCallback: ^(NSDictionary *result) {NSLog(@"Receipt received: %@", result);}
transactionCompleteCallback: ^(NSDictionary *result) {NSLog(@"Transaction complete: %@", result);}];
voidPreAuth
-
requestParams -
completionReference
Void a previously opened preAuth (initiateOpenPreAuth). This discards the hold on funds in the customer's account.
Parameters:
-
requestParamsObjectAn object containing the following properties:
-
[integrationKey]String optionalSupply the integration key if your browser does not support local storage.
-
[mid]Int optionalOverride the configured mid for multi-merchant terminals.
-
[tid]Int optionalOverride the configured tid for multi-merchant terminals.
-
-
completionReferenceStringTransaction identifier from the original transaction.
Example:
// iOS
[self.client performOperation: @"voidPreAuth"
parameters: @{@"completionReference" : @"439440",
@"integrationKey" : @"ABC123",
@"mid" : @"1",
@"tid" : @"2"}
receiptReceivedCallback: nil
transactionCompleteCallback: ^(NSDictionary *result) {NSLog(@"Transaction complete: %@", result);}];
voidTab
-
completionReference
Void a previously opened bar tab (initiateOpenTab). This discards the hold on funds in the customer's account.
Parameters:
-
completionReferenceStringTransaction identifier from the original transaction.
Example:
// iOS
[self.client performOperation: @"voidTab"
parameters: @{@"completionReference" : @"439440"}
receiptReceivedCallback: nil
transactionCompleteCallback: ^(NSDictionary *result) {NSLog(@"Transaction complete: %@", result);}];
